#ifndef UTHNUMBER_H_
#define UTHNUMBER_H_

#include "UTHValue.h"

namespace phnq
{
	namespace uth
	{
		enum
		{
			UTH_NUMBER_TYPE_INT,
			UTH_NUMBER_TYPE_DOUBLE
		};
	
		class UTHNumber : public UTHValue
		{
			public:
				UTHNumber(int num);
				UTHNumber(double num);
				~UTHNumber();
				bool isInt();
				bool isDouble();
				int intValue();
				double doubleValue();
				void serialize(stringbuf *sb);
				bool equals(UTHValue *val);
				int hash();
	
			private:
				short type;
				union
				{
					int intVal;
					double doubleVal;
				} value;
		};
	}
}

#endif //UTHNUMBER_H_
